<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

    Route::get('index', 'IndexController@index');
    Route::get('sms/code/get', 'AuthController@getCode');
    Route::get('sms/code/verify', 'AuthController@verifyCode');
    Route::get('auth/login', 'AuthController@login');
    Route::get('matlab/page', 'IndexController@makeMatlab');
    Route::post('matlab/process', 'IndexController@processMatlab');

    Route::get('/', 'UserController@login');
    Route::get('login', 'UserController@login');
    Route::post('submit_login_data', 'UserController@submitLoginData');
    Route::get('water/list', 'WaterController@waterList');
    Route::get('water/add', 'WaterController@waterAdd');
    Route::post('water/add/submit', 'WaterController@submitWaterAddData');
    Route::get('water/get', 'WaterController@waterGet');
    Route::post('water/edit', 'WaterController@waterEdit');
    Route::get('water/father_node/get', 'WaterController@getFatherNode');
    Route::get('water/child_node/get', 'WaterController@getChildNode');
    Route::get('water/child/list', 'WaterController@childList');
    Route::get('water/line', 'WaterController@waterLine');
    Route::get('water/first_node_level/list', 'WaterController@firstNodeLevelWaterMeterList');
    Route::get('water/radix/excel/page', 'WaterController@waterRadixExcelPage');
    Route::post('water/radix/excel/upload', 'WaterController@importWaterMeterRadixExcel');
    Route::get('water/statistic/get',  'WaterController@getWaterMeterStatistic');
    Route::get('water/statistic/week/comparison',  'WaterController@waterMeterWeekComparison');
    Route::get('water/day/radix/list',  'WaterController@singleWaterMeterDayRadixList');
    Route::get('water/tree',  'WaterController@waterMeterTree');
    Route::get('water/first_class_node/list',  'IndexController@firstClassNodeWaterMeterList');
    Route::get('water/day_consumption/auto_add',  'WaterController@autoInsertIntoWaterMeterDayConsumption');
    Route::get('chart/index','ChartController@index');
    Route::get('valve/list', 'ValveController@valveList');
    Route::get('valve/add', 'ValveController@valveAdd');
    Route::post('valve/add/submit', 'ValveController@submitValveAddData');
    Route::get('valve/get', 'ValveController@valveGet');
    Route::post('valve/edit', 'ValveController@valveEdit');
    Route::get('lngandlat/get', 'CommonController@lngAndLatGet');
    Route::get('test', 'TestController@test');
    Route::group(['middleware' => 'auth'], function () {
        Route::get('logout', 'UserController@logout');
        //Route::get('index', 'UserController@index');

   });

